package com.chen.spike.service;

import com.chen.spike.model.PostOrder;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderService {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void createService(PostOrder postOrder) {


        rabbitTemplate.convertAndSend("order-request-queue", postOrder);
    }
}
